<?php defined('_JEXEC') or die('Restricted access'); ?>

<?php
JRequest::setVar( 'hidemainmenu', 1 );

if ($this->row->image == '') {
    $this->row->image = 'blank.png';
}

JHTML::_('behavior.tooltip');         
JFilterOutput::objectHTMLSafe( $this->row, ENT_QUOTES, 'misc' );
$editor = &JFactory::getEditor();
?>

<script language="javascript" type="text/javascript">
<!--
function submitbutton(pressbutton) {
    var form = document.adminForm;
    if (pressbutton == 'cancel') {
        submitform( pressbutton );
        return;
    }

    // do field validation
    if ( form.name.value == "" ) {
        alert( "<?php echo JText::_( 'You must provide a name.', true ); ?>" );
    } else {
        submitform( pressbutton );
    }
}

function changeImage(){
    if (document.forms.adminForm.image.value != '') {
        document.forms.adminForm.image_src.src='../'+document.forms.adminForm.image.value;
    } 
    else {
        document.forms.adminForm.image_src.src='../images/blank.png';
    }
}
//-->
</script>

<form action="index.php?<?php echo $this->component; ?>" method="post" name="adminForm">     
    <div class="col width-80">
        <fieldset class="adminform">
            <legend><?php echo JText::_( 'Details' ); ?></legend>    
            <table class="adminform">
                <tr>
                    <td>
                        <label for="name"><?php echo JText::_( 'Name' ); ?>:</label>
                    </td>
                    <td >
                        <input class="inputbox" type="text" name="name" id="name" size="60" maxlength="255" value="<?php echo $this->row->name; ?>" />
                    </td>
                </tr>
                <tr> 
                    <td>
                        <label for="ordering"><?php echo JText::_( 'Ordering' ); ?>:</label>  
                    </td>
                    <td>
                        <input class="inputbox" type="text" name="ordering" id="ordering" size="5" maxlength="255" value="<?php echo $this->row->ordering; ?>" />  
                    </td>   
                </tr>  
            </table>
        </fieldset>  
    </div>     
    <div class="col width-20">
        <fieldset class="adminform">
            <legend><?php echo JText::_( 'Parameters' ); ?></legend> 
            <?php 
            echo $this->pane->startPane("menu-pane"); 
            ?>
            <div style="height: 70px;"></div>
            <?php           
            echo $this->pane->endPane();
            ?>
        </fieldset>
    </div>
    <div class="clr"></div>
    
    <input type="hidden" name="option" value="com_mwc_employee" />
    <input type="hidden" name="task" value="" />
    <input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
    <input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
    <input type="hidden" name="id" value="<?php echo $this->row->id; ?>" />   
    <?php echo JHTML::_( 'form.token' ); ?>
</form>
